package com.yitong.equipment.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yitong.equipment.R

class HomeNewCourseAdapter(data: MutableList<String>? = null) : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_home_new_course, data) {

    override fun convert(holder: BaseViewHolder, item: String) {
        holder.setGone(R.id.viewLine, holder.bindingAdapterPosition<1)
        if (holder.bindingAdapterPosition%2==0) {
            holder.setImageResource(R.id.img,R.drawable.img_default_holder)
        }else{
            holder.setImageResource(R.id.img,R.drawable.img_default_holder1)
        }
    }

}